package com.yunzhou.service;

import com.yunzhou.dto.ESForumArticleDTO;
import com.yunzhou.entity.ForumArticle;

import java.io.IOException;
import java.util.List;

public interface ElasticSearchService {
    // 从ElasticSearch中获取文章列表
    List<ESForumArticleDTO> getForumArticleList(Integer orderType, Integer pageNum, Integer pageSize) throws IOException;

    // 根据文章标题 从ElasticSearch中查询文章
    List<ESForumArticleDTO> getForumArticleListByTitle(String title, Integer orderType, Integer pageNum, Integer pageSize) throws IOException;

    // 新增文章到ES
    void addForumArticleDocument(ForumArticle forumArticle) throws IOException;
}
